<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
<title>Insert title here</title> 
<script LANGUAGE="JScript"> 
// var oPopup = window.createPopup(); 
function ButtonClick(div) 
{ 
    alert(1)
//var div = document.getElementById('divId'); 
div.contentEditable = 'true'; 
var controlRange; 

controlRange = document.body.createControlRange(); 
controlRange.addElement(div); 
controlRange.execCommand('Copy'); 
 
} 
</script> 
</head> 
<body> 
  <div id="divId1"> 
    <img src="c.jpg" onclick="ButtonClick(this)"> 
  </div> 
</BODY> 
</body> 
</html>